﻿#region using statements

using System;

using Microsoft.Xna.Framework;

using NGen;
using NGen.Managers.GUI;

using Nuclex.UserInterface;
using Nuclex.UserInterface.Controls;

#endregion

namespace Psych.GUILayouts
{
    public class GUIElementCreditsWindow : GUIElement
    {
        private readonly LabelControl m_label = new LabelControl();

        private readonly WindowWithOkButtonControl m_window = new WindowWithOkButtonControl();

        protected override void _Cleanup() { }

        protected override void _Initialize()
        {
            m_window.Bounds = new UniRectangle(new UniScalar(0.125f, 0), new UniScalar(0.075f, 0.0f), 600, 500);
            m_window.OkButton.Pressed += _OkButtonClick;
            m_window.OkButton.Bounds = new UniRectangle(new UniScalar(0.5f, -37.5f), new UniScalar(0.85f, 0.0f), new UniScalar(75.0f), new UniScalar(35.0f));
            m_window.Title = "Credits";

            m_label.Bounds = new UniRectangle(new UniScalar(0.1f, 0), new UniScalar(0.2f, 0), 0, 0);
            m_label.Text = "blah blah blah blah blah\n\n\n";
           
            

            m_window.Children.Add(m_label);
            _Children.Add(m_window);
        }

        protected override void Update(GameTime p_gameTime) { }

        protected virtual void _OkButtonClick(object p_sender, EventArgs p_e)
        {
            GameEngine.GetService<IManagerGUI>().RemoveElement(this);
        }
    }
}